package org.jeecg.modules.paycenter.channel.zzbank.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.paycenter.channel.zzbank.dto.CorSinglePayDto;
import org.jeecg.modules.paycenter.channel.zzbank.dto.CreateSubAccountDto;
import org.jeecg.modules.paycenter.channel.zzbank.entity.HyZzbankAccount;
import org.jeecg.modules.paycenter.channel.zzbank.vo.AllocateVo;
import org.jeecg.modules.paycenter.channel.zzbank.vo.WithdrawalVo;
import org.jeecg.modules.wlhy.bill.entity.HyDriverBill;
import org.jeecg.modules.wlhy.utils.R;

import java.util.Map;

public interface IHyZzbankAccountService extends IService<HyZzbankAccount> {

    /**
     * 创建郑州银行清分账户
     * @param createSubAccountDto
     * @return
     */
    HyZzbankAccount createSubAccount(CreateSubAccountDto createSubAccountDto);

    /**
     * 根据清分账户账号查询
     * @param subAccNo
     * @return
     */
    String subAccountInfoByAccNo(String subAccNo);


    /**
     * 虚户到实户转账
     * @param transferVo
     * @return
     * @throws Exception
     */
    Map<String, String> transfer(WithdrawalVo transferVo) throws Exception;

    /**
     * 根据交易流水号查询交易结果
     * @param erpJnlNo 交易流水号
     * @param transType 交易类型
     * @return
     */
    Map<String, String>  queryTransferResult(String erpJnlNo, String transJnl,String subAccNo,String transType, String startDate, String endDate);

    /**
     * 虚户之间的划拨
     * @param allocateVo
     */

    Map<String, String>  allocateTransfer(AllocateVo allocateVo) throws Exception;

    /**
     * 根据司机流水单下载回单到本地
     * @param driverBill
     * @return
     */
    R downloadReceipt4Driver(HyDriverBill driverBill) throws Exception;

    /**
     * 提现结口
     * @param singlePayDto
     * @param outAccountInfo
     * @return
     */

    R transfer4All(CorSinglePayDto singlePayDto, HyZzbankAccount outAccountInfo) throws Exception;

    /**
     * 根据司机流水单下载回单到本地
     * @param fileName
     * @return
     */
    String downloadReceipt4DriverByFileName(String fileName) throws Exception;
}
